/*
    IceCode toolkit - maths
    Copyright (C) 2011 Alfredo 'IceCoder' Mungo

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _ICECODE_PYTHAGORAS_VECTOR
#define _ICECODE_PYTHAGORAS_VECTOR

#include <cmath>
#include "Matrix.hpp"
#include "Exception.hpp"

namespace icecode {
  namespace maths {

    /*@
      DESCRIPTION:
       Generic vector class.

      ARGUMENTS:
       DIM: int
        Vector dimension.
       T: typename
        Vector element type.
    */
    template<int DIM, typename T = double>
    class Vector : public icecode::maths::Matrix<DIM, 1, T>
    {
#include "Vector_internal.hpp"
    };

    template<typename T = double>
    class Vector<3, T> : public icecode::maths::Matrix<3, 1, T>
    {
#include "Vector_internal.hpp"
#include "Vector3_internal.hpp"
    };

    //Vector4
    typedef Vector<4, float> Vector4f;
    typedef Vector<4, double> Vector4d;
  
    //Vector3
    typedef Vector<3, float> Vector3f;
    typedef Vector<3, double> Vector3d;

    //Vector2
    typedef Vector<2, float> Vector2f;
    typedef Vector<2, double> Vector2d;

  }
}

#endif //_ICECODE_PYTHAGORAS_VECTOR
